﻿using LikeProxy.Controls;
using System;
using System.Windows.Forms;

namespace LikeProxy
{
    public partial class MainForm : Form
    {
        JSONEditorControl jsonEditorControl;
        public MainForm()
        {
            InitializeComponent();
            jsonEditorControl = new JSONEditorControl();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            tabPage_request.Controls.Add(new RequestControl());
            tabPage_whistle.Controls.Add(new WhistleControl());
            tabPage_browser.Controls.Add(new BrowserControl());
            tabPage_qrcode.Controls.Add(new QrcodeControl());
            tabPage_encode.Controls.Add(new UrlEncodeControl());
            //tabPage_regex.Controls.Add(new RegexControl());
            tabPage_image_to_base64.Controls.Add(new ImageToBase64Control());
            tabPage_short_url.Controls.Add(new ShortUrlControl());
            tabPage_json_editor.Controls.Add(jsonEditorControl);
        }

        public void TransferToJSONEditor(string jsonStr)
        {
            //jsonEditorControl.ParseJSON(jsonStr);
            tabControl1.SelectedIndex = 3;
        }
    }


}
